package com.whjfxx.terminal.biz.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.whjfxx.terminal.biz.param.ImportPageParam;
import com.whjfxx.terminal.biz.param.SearchParam;
import com.whjfxx.terminal.biz.vo.ImportDataVo;
import com.whjfxx.terminal.biz.vo.ImportVo;
import com.whjfxx.terminal.entity.PoImportLog;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface PoImportLogService extends IService<PoImportLog> {

    /**
     * 分页查询
     * @param param
     * @return
     */
    Page<ImportVo> pageList(SearchParam<ImportPageParam> param);

    /**
     * 导入文件
     * @param multipartFile
     * @return  uuid
     */
    String importXlsx(MultipartFile multipartFile, XSSFWorkbook workbook) throws IOException;

    /**
     *
     * @param batchNo
     * @return
     */
    List<ImportDataVo> readXlsx(String batchNo);

    /**
     * 校验数据
     * @param batchNo
     */
    void valid(String batchNo);

    /**
     * 正式导入数据
     * @param batchNo
     */
    void importData(String batchNo);
}
